package zero.tech.games.phz.data.entity;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import zero.tech.games.phz.data.consts.DataType;

public class PlayerData {
	private int uid;//玩家id
	private final List<Data> baipais=new ArrayList<>();//摆牌数据
	private final List<OpData> op_datas=new ArrayList<>();//废牌数据
	private final List<Card> hands=new ArrayList<Card>();//手牌集合
	private final List<Integer> qipenglist=new ArrayList<>();//弃碰集合
	private final List<Integer> qichilist=new ArrayList<>();//弃吃集合
	private final Set<Integer> hu_types=new HashSet<>();//胡类型集合
	private boolean forbit_chipeng=false;//禁止吃碰
	private boolean qihu=false;//弃胡
	private int out_count;
	private long last_outcard_time;
	private long last_cphop_time;
	
	public PlayerData(int uid, List<Card> list) {
		this.uid=uid;
		this.hands.addAll(list);
	}

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public List<Data> getBaipais() {
		return baipais;
	}

	public List<OpData> getOp_datas() {
		return op_datas;
	}

	public List<Card> getHands() {
		return hands;
	}


	public int paoPaiSize() {
		int count=0;
		for(Data data:baipais) {
			if(data.getType()==DataType.PAOPAI||data.getType()==DataType.TIPAI) {
				count++;
			}
		}
		return count;
	}

	public List<Integer> getQipenglist() {
		return qipenglist;
	}

	public List<Integer> getQichilist() {
		return qichilist;
	}

	public boolean isQihu() {
		return qihu;
	}

	public void setQihu(boolean qihu) {
		this.qihu = qihu;
	}

	public boolean isForbit_chipeng() {
		return forbit_chipeng;
	}

	public void setForbit_chipeng(boolean forbit_chipeng) {
		this.forbit_chipeng = forbit_chipeng;
	}

	public int getOut_count() {
		return out_count;
	}

	public void setOut_count(int out_count) {
		this.out_count = out_count;
	}

	public Set<Integer> getHu_types() {
		return hu_types;
	}

	public long getLast_outcard_time() {
		return last_outcard_time;
	}

	public void setLast_outcard_time(long last_outcard_time) {
		this.last_outcard_time = last_outcard_time;
	}

	public long getLast_cphop_time() {
		return last_cphop_time;
	}

	public void setLast_cphop_time(long last_cphop_time) {
		this.last_cphop_time = last_cphop_time;
	}
}
